home *** CD-ROM | disk | FTP | other *** search
- extern SysEnvRec gMac;
-
- /*****
- * samplerWindow.c
- *
- * The window routines for the Michael Kamprath's CDEF demo
- *
- * It is based on Symentic's TICK C 5.0 Bullseye demo.
- *
- *****/
-
- #include "samplerWindow.h"
- #include "samplerControls.h"
-
- WindowPtr samplerWindow;
-
- Rect dragRect;
- Rect windowBounds = { 40, 40, 240, 265 };
- Rect circleStart = {10, 10, 100, 100};
- int width = 5;
-
- /****
- * SetUpWindow()
- *
- * Create the Bullseye window, and open it.
- *
- ****/
-
- void SetUpWindow(void)
-
- {
-
- dragRect = screenBits.bounds;
-
- if (gMac.hasColorQD)
- {
- samplerWindow = NewCWindow(0L, &windowBounds, "\pCDEF Sampler",
- true, noGrowDocProc, (WindowPtr) -1L, true, 0);
- }
- else
- {
- samplerWindow = NewWindow(0L, &windowBounds, "\pCDEF Sampler",
- true, noGrowDocProc, (WindowPtr) -1L, true, 0);
- }
-
- SetPort(samplerWindow);
-
-
- SetUpWindowCntls();
-
- }
- /* end SetUpWindow */
-
-
- /*****
- * DrawBullseye()
- *
- * Draws the bullseye.
- *
- *****/
-
- void DrawSampleWindow(short active)
-
- {
- SetPort(samplerWindow);
-
- MoveTo(5,10);
- TextSize(9);
- DrawString("\pKamprath's CDEF Package Sampler");
- TextSize(12);
-
- DrawControls(samplerWindow);
- }
- /* end DrawBullseye */